<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>注册页</title>
    <base href="${pageContext.request.contextPath }/">
    <link rel="stylesheet" type="text/css" href="css/common/commonutils.css">
    <link rel="stylesheet" type="text/css" href="css/login/content.css">
    <link rel="stylesheet" type="text/css" href="css/index/head.css">
    <link rel="stylesheet" type="text/css" href="css/index/foot.css">
    <link id="favicon" rel="shortcut icon" href="favicon.ico" type="image/svg+xml">
    <script type="text/javascript" src="js/jquery-3.5.1.min.js"></script>
    <script type="text/javascript" src="js/commons.js"></script>
    <script type="text/javascript">
    
    </script>
</head>

<body>
	
    <!-- 头部内容 -->
    <div id="head">
        <!-- 最上方的导航栏 -->
        <div id="navigation">
            <ul>
                <c:if test="${empty sessionScope.user }">
                	<li style="margin-right: 30px;">您好，请先登录~</li>
                </c:if>
                <c:if test="${not empty sessionScope.user }">              
                	<li style="margin-right: 30px;">欢迎您，${sessionScope.user.name }</li>
                </c:if>
                <li>当前所在地：地球村</li>
            </ul>
            
            <ul>
                <li>
                    <i id="shoping_cart_logo"></i>
                    <a href="shoppingcart">购物车</a>
                    <b class="shoping_cart_num">
                    <c:if test="${empty sessionScope.shoppingNum}">0</c:if>
                    <c:if test="${not empty sessionScope.shoppingNum}">${sessionScope.shoppingNum}</c:if>
                    </b>
                </li>
                <li>|</li>
                <li><a href="orders">我的订单</a></li>
                <li>|</li>
                <li id="my_home"><a href="">我的钱包</a><i>您的余额:${sessionScope.user.balance }</i></li>
                <li>|</li>
                <c:if test="${empty sessionScope.user }">
                	<li><a href="login">登录</a></li>
                </c:if>
                <c:if test="${not empty sessionScope.user }">
                	<li><a href="exit">注销</a></li>
                </c:if>
                <li>|</li>
                <li><a href="register">注册</a></li>
            </ul>
        </div>
    </div>
    <!-- 注册内容 -->
    <div id="content">
        <!-- 左侧内容左边的大图片 -->
        <div id="content_logo"></div>
        <div id="content_login">

            <div>密码登录</div>
            <!-- 验证用户名和密码 -->
            <div id="username">
                <input type="text" value="${cookie.username.getValue() }" placeholder="请输入你的用户名或邮箱">
            </div>
            <c:if test="${not empty cookie.umsg.getName() }">
            	<p>${cookie.umsg.getValue() }</p>
            </c:if>
            	
            <div id="password">
                <input type="password" value="${cookie.password.getValue() }" placeholder="请输入你的密码（6-16位）">
            </div>
            <!-- 验证 验证码 -->
            <div id="verification_code">请输入验证码:<input type="text"></div>
            <div id="verification_pic"><img src="#" /><a href="javascript:void(0)" onclick="getLineCaptcha()">看不清，换一张...</a></div>
            <c:if test="${not empty cookie.vmsg.getName() }">
            	<p>${cookie.vmsg.getValue() }</p>
            </c:if>
            <!-- 记住密码和忘记密码 -->
            <div id="check_pwd">
            
                <span>
                	<c:if test="${empty cookie.checked.getValue() }">
                		<input type="checkbox" >记住密码
                	</c:if>
                	<c:if test="${not empty cookie.checked.getValue() }">
                		<input type="checkbox" checked>记住密码
                	</c:if>
                	
                </span>
                <a href="#">忘记密码</a>
            </div>
            <!-- 登录和注册 -->
            <div id="toSorR">
                <span id="submit"><a href="javascript:void(0)">登录</a></span>
                <span id="register"><a href="register">注册</a></span>
            </div>
        </div>
    </div>
    <!-- 尾部 -->
    <div id="footer">Copyright 2020 由小行星个人制作的图书网站</div>
    <script  type="text/javascript" src="js/login/checklogin.js"></script>
  
</body>

</html>